package componentes;

import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class AvisoSwing extends JDialog{
	public AvisoSwing(){
	JPanel panel = new JPanel();
	JLabel label = new JLabel("Usuario no encontrado"); 
	//JButton button= new JButton("Crear Usuario");
	panel.setLayout(new GridLayout(0, 1));
	//panel.add(button);
	panel.add(label);
	getContentPane().add(panel, BorderLayout.CENTER);
	this.resize(200, 100);
	this.pack();	
	//this.setResizable(false);
	this.setVisible(true);
	
	this.addWindowListener(new WindowAdapter() {
		public void windowClosing(WindowEvent e) { 				
			//System.exit(0);
			setVisible(false);
		} 
	}); 
	}
}
